// 公用接口api
import { fetch, oss } from '@/utils/fetch.js';

// 考试列表查询
export function getExamList(params) {
  return fetch({
    url: '/usercenter/operation/exam/queryList',
    method: 'POST',
    data: params,
  });
}

// 课程关联列表
export function queryCourseList(params) {
  return fetch({
    url: '/usercenter/operation/exam/queryCourseList',
    method: 'POST',
    data: params,
  });
}

//查询考试详情
export function getExamDetailsById(params) {
  return fetch({
    url: '/questionlib/exam/info',
    method: 'POST',
    data: params,
  });
}

// 添加考试
export function addEaxm(params) {
  return fetch({
    url: '/questionlib/exam/save',
    method: 'POST',
    data: params,
  });
}

// 关联课程
export function relevance_course(params) {
  return fetch({
    url: '/questionlib/exam/relevance_course',
    method: 'POST',
    data: params,
  });
}

// 关联试卷
export function relevance_paper(params) {
  return fetch({
    url: '/questionlib/exam/relevance_paper',
    method: 'POST',
    data: params,
  });
}

// 考试详情查询
export function queryStudentTaskList(params) {
  return fetch({
    url: '/questionlib/studentExamTask/details',
    method: 'POST',
    data: params,
  });
}

// 修改考试
export function updateExam(params) {
  return fetch({
    url: '/questionlib/exam/update',
    method: 'POST',
    data: params,
  });
}
